; ###################################### ; ; Advanced Mp3 Playlist Generator ; ; Created by: Sabby ; Email: mirc_sabby@hotmail.com ; Network: ETG (irc.enterthegame.com) ; Channel: #Helpdesk ; Syntax: ; /mpl [-f | -s | -l | -k] <-h | -t> [Directory] ; -f = File Name ; -s = Size of File ; -l = Length of File ; -k = Kbps of File ; These are optional, the default = -fslk ; ; -h = HTML File ; -t = TXT File ; These MUST be entered ; ; Directory is also optional, if not supplied ; script will ask you through a $sdir dialog ; ; NOTE: ; When you create a txt file, i made each input ; (filename,size,length,kbps) seperated by $chr(160) ; this is an invisible char and i did this so you can seperate ; each one using $gettok if you wish.. Update to come ; is to make you choose the char. ; ; NOTE: ; When you are creating the list, mirc may seem to be ; freezed but it is not! It is just reading the date and it ; will take longer for more mp3s ; ; Examples: ; /mpl -h (creates default html playlist) ; /mpl -t (creates default text playlist) ; /mpl -h C:\Mp3s\ (creates a default html playlist for C:\Mp3s\) ; /mpl -t C:\Mp3s\ (you should know... text file thats right!) ; /mpl -fl -h (creates a html playlist that has the file name and its length) ; /mpl -fsk -t C:\Mp3s\ (creates a text playlist with file name, size, and kbps in the directory C:\Mp3s\) ; ; ###################################### alias mpl { ; Variable Settings var %l = $ [ $+ [ $0 [ $+ [ - ] ] ] ] if ($0 == 1) || (: !isin %l) { var %dir = $sdir($mircdir,Mp3 Directory) } if (: isin %l) { var %dir = $shortfn(%l)) } var %file = mpl. $+ $iif($ [ $+ [ $iif(- isin %l,$0,$calc($0 -1)) ] ] == -h,html,txt) var %w = write %file ; Error Checking if (!$isdir(%dir)) || (!$1) { echo -s *** /mpl: Error | return } $iif($isfile(%file),.remove %file) var %z = $iif((-h isin $1) || (-t isin $1),fslk,$remove($1,-)) window -hs @mpl ; This writes all the coding, Songs name.. Size.. Length.. Kbps ; check the /mplu alias at the bottom of this snippet var %m = $findfile(%dir,*.mp3,0) var %f = $findfile(%dir,*.mp3,0,mplu %file %z $+($1-,$chr(160),%m)) $iif(html isin %file,goto html,goto txt) ; HTML Coding (Done in tables..) :html %w $+(
Song Name | ), $& $iif(s isin %z,Size | ), $& $iif(l isin %z,Length | ), $& $iif(k isin %z,Kbps |
---|